<template>
	<view class="page">
		<u-sticky offset-top="-50">
			<view style="background: #fff;">
				<u-tabs :list="tabs" @click="clickTab" lineColor="#24c373"
					:activeStyle="{'color':'#24c373','font-weight':'bold'}" :scrollable="false"></u-tabs>
			</view>
		</u-sticky>
		<view style="width:94%;margin:0 auto;">
			<view class="order-view" v-for="(item,index) in 10" @click="to('/pages/order/detail',{})">
				<view class="order-top">
					<view class="order-title">
						<label>服务技师：隔壁老王</label>
						<label style="font-weight: bold;">服务完成</label>
					</view>
				</view>
				<view class="order-center">
					<view><label>中医推拿</label><label class="count">x1</label></view>
					<view class="time-price">
						<view>服务时间:2022-02-02 07:00:00</view>
						<view style="price">
							<label style="font-size: 20rpx;color:red;">￥</label>
							<label style="font-size: 30rpx;color:red;font-weight: bold;">298.00</label>
						</view>
					</view>
				</view>
				<view class="order-bottom">
					<view class="button">再次购买</view>
				</view>
			</view>
		</view>

		<view style="width:100%;height: 100rpx;"></view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				tabs: [{
					name: '全部'
				}, {
					name: '进行中'
				}, {
					name: '已完成'
				}, {
					name: '待评价'
				}, {
					name: '已取消'
				}]
			}
		},
		onLoad() {

		},
		methods: {
			clickTab(e) {
				console.log(e);
			},
			to(url, params) {
				uni.navigateTo({
					url: url,
					data: params
				})
			}
		}
	}
</script>

<style scoped>
	.order-view {
		width: 100%;
		margin-top: 20rpx;
		background: #fff;
		border-radius: 20rpx;
	}

	.order-top {
		width: 100%;
		background: #e3fff1;
		height: 60rpx;
		line-height: 60rpx;
		border-top-left-radius: 20rpx;
		border-top-right-radius: 20rpx;
	}

	.order-title {
		width: 96%;
		color: #24c373;
		display: flex;
		justify-content: space-between;
		align-items: center;
		font-size: 26rpx;
		margin: 0 auto;
	}

	.count {
		font-size: 26rpx;
		font-weight: normal;
		margin-left: 10rpx;
	}

	.order-center {
		width: 96%;
		margin: 0 auto;
		font-weight: bold;
		font-size: 30rpx;
		margin-top: 10rpx;
		/* height: 60rpx;
	line-height: 60rpx; */
	}

	.time-price {
		width: 100%;
		display: flex;
		justify-content: space-between;
		align-items: center;
		font-weight: normal;
		color: #8d8d8d;
		font-size: 24rpx;
	}

	.price {
		display: flex;
		align-items: baseline;
	}

	.order-bottom {
		width: 96%;
		display: flex;
		justify-content: flex-end;
		margin: 0 auto;
		padding-bottom: 10rpx;
		margin-top: 10rpx;
	}

	.button {
		width: 130rpx;
		height: 50rpx;
		border-radius: 20rpx;
		border: 2rpx solid #999;
		text-align: center;
		line-height: 50rpx;
		font-size: 28rpx;
	}
</style>